package org.john.javalib;

import org.john.guavatest.IDAndParty;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by adsame on 17-9-15.
 */

public class ListTest {
//    public abstract class ListParent {
//        public abstract List<String> testList(List<String> input);
////        public List<String> testList(List<String> input) {
////            List<String> arr = new ArrayList<String>();
////            arr.add("parent");
////            return arr;
////        }
//    }
//
//    public class ListChild extends ListParent{
//        @Override
//        public List<String> testList(List<String> input) {
//            List<String> arr = new ArrayList<String>();
//            arr.add("child");
//            return arr;
//        }
//    }

    public static void main(String[] args) {
        List<IDAndParty> list = new ArrayList<IDAndParty>();
        list.add(new IDAndParty("t1", "p1"));
        list.add(new IDAndParty("t2", "p2"));
        list.add(new IDAndParty("t3", "p3"));
        list.add(new IDAndParty("t4", "p4"));
        list.add(new IDAndParty("t5", "p5"));
        System.out.println(list);
        SubClass child = new SubClass();
        child.testList(null);
        List<Integer> empty = new ArrayList<Integer>();
        if (empty.contains(1)) {
            System.out.println("impossible");
        } else {
            System.out.println("not contain, no exception");
        }
        if (empty.contains(null)) {
            System.out.println("contain null");
        } else {
            System.out.println("not contain, no exception for null");
        }
    }
}
